/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package invitation;

import java.util.List;
import model.Account;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 *
 * @author tomasz
 */
@Controller
@RequestMapping("/list/invitation.htm")
public class ListInvitation {
    
    
    private dao.Account account;
    
    private dao.Firma firma;
    
    @Autowired
    public void setFirma(dao.Firma firma){
        this.firma = firma;
    }
    @Autowired
    public void setAccount(dao.Account account){
        this.account = account;
    }
    
    
    @RequestMapping(method = RequestMethod.GET)
    public String ListaInvitation(Model model) {
        
          List firma = this.firma.allFirmaInvitation();
          
          model.addAttribute("firma", firma);
        
        return "invitation/invitation_list";
        
    }
    
}
